<html xmlns="http://www.w3c.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:body>

	<f:view>
		<ui:composition template="templates/masterLayout.xhtml">
			<ui:define name="leftSidebar">
				<ui:include src="sections/common/menu.xhtml" />
			</ui:define>
			<ui:define name="contentContainer">
				<h:form>
					<h:panelGrid columns="2">
						<h:outputLabel value="stock" />
						<h:inputText value="#{transactionHistoryBean.history.stock}"></h:inputText>
						<h:outputLabel value="transaction type" />
						<h:selectOneMenu value="#{transactionHistoryBean.history.transactionType}">
							<f:selectItem  itemLabel="Buy" itemValue="Buy" />
							<f:selectItem  itemLabel="Sell" itemValue="Sell" />
						</h:selectOneMenu>
						<h:outputLabel value="value"/>
						<h:inputText value="#{transactionHistoryBean.history.value}" >
							<f:convertNumber integerOnly="true"/>
						</h:inputText>
						<h:outputLabel value="quality"/>
						<h:inputText value="#{transactionHistoryBean.history.quality}" >
							<f:convertNumber integerOnly="true"/>
						</h:inputText>
						<h:outputLabel value="transaction date"/>
						<h:inputText value="#{transactionHistoryBean.history.transactionDate}" >
							<f:convertDateTime pattern="MM/dd/yyyy" timeZone="GMT+7"></f:convertDateTime>
						</h:inputText>
					</h:panelGrid>
					<h:inputHidden value="#{loginBean.user.username}" >
					</h:inputHidden>
					<h:commandButton value="Save" type="submit"
						action="#{transactionHistoryBean.save}"></h:commandButton>
				</h:form>
			</ui:define>
		</ui:composition>
	</f:view>
</h:body>
</html>
